#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H

#include "clientsocket.h"

#include <QDialog>
#include <QComboBox>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QGridLayout>

namespace Ui {
class LoginDialog;
}

class LoginDialog : public QDialog
{
    Q_OBJECT

public:
    explicit LoginDialog(QWidget *parent = nullptr);
    ~LoginDialog();

private:
    Ui::LoginDialog *ui;

private:
    QLabel *uimgLabel;
    QLineEdit *unameLineEdit;
    QLineEdit *upassLineEdit;

    QComboBox *hostCombox;
    QPushButton *loginButton;
    QPushButton *exitButton;

    QGridLayout *mainLayout;

    ClientSocket *clientSocket;

private slots:
    void login();
    void receiveData(QString);
    void sendLoginData();
};

#endif // LOGINDIALOG_H
